package net.cyue.web.easyquery.core.db.data;

public class QueryPage {

    private final int page;
    private final int pageSize;
    private final boolean doCount;

    public QueryPage(int page, int pageSize) {
        this.page = Math.max(page, 1);
        this.pageSize = Math.max(pageSize, 1);
        this.doCount = false;
    }
    public QueryPage(int page, int pageSize, boolean doCount) {
        this.page = page;
        this.pageSize = pageSize;
        this.doCount = doCount;
    }

    public int getPage() {
        return this.page;
    }

    public int getPageSize() {
        return this.pageSize;
    }

    public boolean ifDoCount() {
        return this.doCount;
    }
}
